<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<jsp:include page="template-head.jsp" />
<jsp:include page="template-body.jsp"/>
<div class ="hero-unit">
<div id="sendsurveypage">
<div class="container">
	<jsp:include page="errors.jsp"/>
	<c:choose>
		<c:when test="${sendsurvey == 'init'}">
		<div id="sendsurveypageinit">
			<form id="sendsurveyinit" method="post" action="sendsurvey.do">
				<input type="submit" name="button" class="btn btn-success" value="Send to mailing list"><br/><br/>
				<input type="submit" name="button" class="btn btn-success" value="Send to individual respondents"><br/><br/>
			</form>
		</div>
		</c:when>
		
		<c:otherwise>	
		<div id="sendsurveypagebody">
			<form  method="post" action="sendsurvey.do">
				<c:if test="${sendsurvey == 'individual'}">
				<div id="respondentid">
					<i class="icon-user"></i>
					Receiver :<input type="text" name="userid" value="${sendsurveyform.userid}"/>
					<input type="submit" name="button" class="btn btn-info"  value="Add to mail list">
				</div>	
				<div id="respondentemail">
					<div class="control-group">
					<span class="add-on">
					<i class="icon-envelope"></i>
					</span>
					Email :<input type="text" name="email" value="${sendsurveyform.email}"/>	
					</div>
				</div>
				</c:if>
				
				<div id="Subject">
					<i class="icon-star"></i>
					Subject :  <input type="text" name="subject" value="Please fill out this survey"/>		
				</div>
				<div id="Message">
					<i class="icon-pencil"></i>
					Message : <textarea  rows=5 cols=35 name="emailmessage">
					<c:if test="${!(empty content)}">
					${content}
					</c:if>
					</textarea>			
				</div>
				<div id="sendsurveybackbutton">
					<input type="submit" name="button" class="btn btn-inverse"  value="Back"><br/><br/>
					<input type="submit" name="button" class="btn btn-success"  value="Send"/>
				</div>
				 <div>
					<input type="submit" name="button" class="btn btn-success"  value="Send (debug mode)"/>
				</div> 
			</form>
		</div>
		</c:otherwise>
	</c:choose>
</div>
</div>
</div>
<%-- 
<!--Create another space for contents' extension  -->
	<div class="container2">
	<!-- <div class="span8">
	<div class="hero-unit">
	<h2>Use mail-list</h2>
	</div>
	</div> -->
 	</div>
 	--%>
<jsp:include page="template-foot.jsp" /> 